package xq.pug.common.exception;

import lombok.Getter;
import xq.pug.common.exception.errorType.ErrorType;
import xq.pug.common.exception.errorType.SystemErrorType;


/**
 * @author RenGaoshuai
 * @date 2023/7/6 13:59
 * @description 自定义异常类
 */
@Getter
public class DefaultException extends RuntimeException{

    private final ErrorType errorType;

    public DefaultException() {
        this.errorType = SystemErrorType.SYSTEM_ERROR;
    }

    public DefaultException(ErrorType errorType) {
        this.errorType = errorType;
    }
}
